from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
from wtforms.validators import DataRequired, Length

class PostForm(FlaskForm):
    title = StringField('标题', validators=[DataRequired(), Length(min=2, max=100)])
    content = TextAreaField('内容', validators=[DataRequired(), Length(min=10)])

class CommentForm(FlaskForm):
    content = TextAreaField('评论内容', validators=[DataRequired(), Length(min=2)]) 